#ifndef __LENGTH_H__
#define __LENGTH_H__
#include "Unit.h"

using namespace LengthSpace;

class Length
{
    friend Length operator+(const Length&, const Length&);

public:
    Length(int, const UNIT &);
    int convertToBaseUnit() const;  
    bool operator==(const Length&) const;

    int calcLengthAtTopLevel();
    int calcLengthAtUnitLevel(int unit);
    int calcLength(int unit);
    void displayAtUnitLevel(int unit);
    void display();
private:
    int  length_m;
    UNIT unit_m;
    int  remaider_m;
};

#endif
